#include "UnicodeClass.h"
#include <cstdio>
#include "LearnDef.h"

USING_NS_LEARN;

int CDECL UnicodeClass::MessageBoxPrintf(TCHAR* szCaption, TCHAR* szFormat, ...)
{
    TCHAR szBuffer[1024];
    va_list pArgList;

    va_start(pArgList, szFormat);
    _vsnwprintf_s(szBuffer, sizeof(szBuffer) / sizeof(TCHAR), szFormat, pArgList);
    va_end(pArgList);

    return MessageBox(nullptr, szBuffer, szCaption, 0);
}

int UnicodeClass::LearnEntry(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
{
    MessageBoxPrintf(TEXT("Learn"), TEXT("The magic number %d"), 42);
    return 0;
}
